package com.ruoyi.gaokao.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gaokao.mapper.GkRegisteredResidenceMapper;
import com.ruoyi.gaokao.domain.GkRegisteredResidence;
import com.ruoyi.gaokao.service.IGkRegisteredResidenceService;

/**
 * 户口所在地编码Service业务层处理
 * 
 * @author xiaosong
 * @date 2025-07-07
 */
@Service
public class GkRegisteredResidenceServiceImpl implements IGkRegisteredResidenceService 
{
    @Autowired
    private GkRegisteredResidenceMapper gkRegisteredResidenceMapper;

    /**
     * 查询户口所在地编码
     * 
     * @param code 户口所在地编码主键
     * @return 户口所在地编码
     */
    @Override
    public GkRegisteredResidence selectGkRegisteredResidenceByCode(String code)
    {
        return gkRegisteredResidenceMapper.selectGkRegisteredResidenceByCode(code);
    }

    //selectGkRegisteredResidenceAll
    @Override
    public List<GkRegisteredResidence> selectGkRegisteredResidenceAll()
    {
        return gkRegisteredResidenceMapper.selectGkRegisteredResidenceAll();
    }

    /**
     * 查询户口所在地编码列表
     * 
     * @param gkRegisteredResidence 户口所在地编码
     * @return 户口所在地编码
     */
    @Override
    public List<GkRegisteredResidence> selectGkRegisteredResidenceList(GkRegisteredResidence gkRegisteredResidence)
    {
        return gkRegisteredResidenceMapper.selectGkRegisteredResidenceList(gkRegisteredResidence);
    }

    /**
     * 新增户口所在地编码
     * 
     * @param gkRegisteredResidence 户口所在地编码
     * @return 结果
     */
    @Override
    public int insertGkRegisteredResidence(GkRegisteredResidence gkRegisteredResidence)
    {
        return gkRegisteredResidenceMapper.insertGkRegisteredResidence(gkRegisteredResidence);
    }

    /**
     * 修改户口所在地编码
     * 
     * @param gkRegisteredResidence 户口所在地编码
     * @return 结果
     */
    @Override
    public int updateGkRegisteredResidence(GkRegisteredResidence gkRegisteredResidence)
    {
        return gkRegisteredResidenceMapper.updateGkRegisteredResidence(gkRegisteredResidence);
    }

    /**
     * 批量删除户口所在地编码
     * 
     * @param codes 需要删除的户口所在地编码主键
     * @return 结果
     */
    @Override
    public int deleteGkRegisteredResidenceByCodes(String[] codes)
    {
        return gkRegisteredResidenceMapper.deleteGkRegisteredResidenceByCodes(codes);
    }

    /**
     * 删除户口所在地编码信息
     * 
     * @param code 户口所在地编码主键
     * @return 结果
     */
    @Override
    public int deleteGkRegisteredResidenceByCode(String code)
    {
        return gkRegisteredResidenceMapper.deleteGkRegisteredResidenceByCode(code);
    }
}
